AdTargeting

class AdTargeting(val age: String? = null, val gender: String? = null, val location: Location? = null, val contextQuery: String? = null, val contextTags: List<String>? = null)

Contains targeting information used for ad requests.

Use the constructor directly from Kotlin:

val targeting = AdTargeting(age = "25", gender = Gender.MALE)

Use Builder from Java:

AdTargeting targeting = new AdTargeting.Builder()
.setAge("25")
.setGender(Gender.MALE)
.build();

Constructors

Link copied to clipboard
constructor(age: String? = null, gender: String? = null, location: Location? = null, contextQuery: String? = null, contextTags: List<String>? = null)

Types

Link copied to clipboard
class Builder

Builds an AdTargeting.

Properties

Link copied to clipboard
val age: String?

User's age

Link copied to clipboard

User's query entered inside the app

Link copied to clipboard

Tags describing current user context inside the app

Link copied to clipboard

User's gender

Link copied to clipboard

User's location for targeting process

Functions

Link copied to clipboard
open operator override fun equals(other: Any?): Boolean
Link copied to clipboard
open override fun hashCode(): Int